<?php 
session_start();
?>
<div id="sidebar"><div id="sidebar-wrapper"> <!-- Sidebar with logo and menu -->
			
			<h1 id="sidebar-title"><a href="#">Simpla Asdmin</a></h1>
		  
			<!-- Logo (221px wide) -->
			<a href="#"><img id="logo" src="../skins/sa/resources/images/logo.png" alt="Simpla Admin logo" /></a>
		  
			<!-- Sidebar Profile links -->
			<div id="profile-links">
				Hello, <a href="#" title="Edit your profile"><?php echo $_SESSION['username'];?></a><br /><?php echo $_SESSION['LAST_LOGIN'] ?><br /> you have <a href="#messages" rel="modal" title="3 Messages">3 Messages</a><br />
				<br />
				<a href="#" title="View the Site">View the Site</a> | <a href="../users/logout.php" title="Sign Out">Sign Out</a><br />
                <a href="../language/change.php?lang=vi" title="Tiếng Việt">Tiếng Việt</a> | <a href="../language/change.php?lang=en" title="Tiếng Anh">Tiếng Anh</a>
			</div>        
			
			<ul id="main-nav">  <!-- Accordion Menu -->
				
				<li>
					<a href="../home/index.php" class="nav-top-item no-submenu"> <!-- Add the class "no-submenu" to menu items with no sub menu -->
						Home
					</a>       
				</li>
				
				<li> 
					<a  id="articles" href="#" class="nav-top-item"> <!-- Add the class "current" to current menu item -->
					Bài viết
					</a>
					<ul>
						<li><a  id="articles_add" cha="articles" href="../articles/add.php">Thêm bài viết</a></li>
						<li><a id="articles_list" cha="articles" href="../articles/list.php">Danh sách bài viết</a></li> <!-- Add class "current" to sub menu items also -->
						<li><a id="articles_categories_add" cha="articles" href="../articles_categories/add.php">Thêm loại bài viết</a></li>
						<li><a id="articles_categories_list" cha="articles"href="../articles_categories/list.php">Danh sách loại bài viết</a></li>
					</ul>
				</li>
				
				<li>
					<a id="products" href="#" class="nav-top-item">
						Sản phẩm
					</a>
					<ul>
						<li><a id="products_add" cha="products" href="../products/add.php">Thêm sản phẩm</a></li>
						<li><a  id="products_list" cha="products" href="../products/list.php">Danh sách sản phẩm</a></li>
                        <li><a  id="products_categories_add" cha="products" href="../products_categories/add.php">Thêm loại sản phẩm</a></li>
                        <li><a  id="products_categories_list" cha="products" href="../products_categories/list.php">Danh sách loại sản phẩm</a></li>
					</ul>
				</li>
				
				<li>
					<a id="don_hang" href="#" class="nav-top-item">
						Quản lý đơn hàng
					</a>
					<ul>
						<li><a id="don_hang_list" cha = "don_hang" href="../don_hang/list.php">Danh sách đơn hàng</a></li>
						
					</ul>
				</li>
				<li>
					<a id="member" href="#" class="nav-top-item">
						Quản lỳ thành viên
					</a>
					<ul>
						<li><a id="member_list" cha = "member" href="../member/list.php">Danh sách thành viên</a></li>
					</ul>
				</li>
				<li>
					<a href="#" class="nav-top-item">
						Hỗ trợ trực tuyến
					</a>
					<ul>
						<li><a href="#">Calendar Overview</a></li>
						<li><a href="#">Add a new Event</a></li>
						<li><a href="#">Calendar Settings</a></li>
					</ul>
				</li>
				
				<li>
					<a  id="recruiment" href="#" class="nav-top-item">
						Tuyển dụng
					</a>
					<ul>
						<li><a  id="recruiment_list" cha="recruiment" href="../recruiment/list.php">Danh sách tuyển dụng</a></li>
					</ul>
				</li> 
                <li>
					<a id="bang_gia" href="#" class="nav-top-item">
						Bảng báo giá
					</a>
					<ul>
						<li><a id="bang_gia_edit" cha="bang_gia" href="../bang_gia/edit.php">Cập nhật bảng báo giá</a></li>
					</ul>
				</li>                                  
                
                
				
			</ul> <!-- End #main-nav -->
			
			<div id="messages" style="display: none"> <!-- Messages are shown when a link with these attributes are clicked: href="#messages" rel="modal"  -->
				
				<h3>3 Messages</h3>
			 
				<p>
					<strong>17th May 2009</strong> by Admin<br />
					Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue.
					<small><a href="#" class="remove-link" title="Remove message">Remove</a></small>
				</p>
			 
				<p>
					<strong>2nd May 2009</strong> by Jane Doe<br />
					Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est.
					<small><a href="#" class="remove-link" title="Remove message">Remove</a></small>
				</p>
			 
				<p>
					<strong>25th April 2009</strong> by Admin<br />
					Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue.
					<small><a href="#" class="remove-link" title="Remove message">Remove</a></small>
				</p>
				
				<form action="#" method="post">
					
					<h4>New Message</h4>
					
					<fieldset>
						<textarea class="textarea" name="textfield" cols="79" rows="5"></textarea>
					</fieldset>
					
					<fieldset>
					
						<select name="dropdown" class="small-input">
							<option value="option1">Send to...</option>
							<option value="option2">Everyone</option>
							<option value="option3">Admin</option>
							<option value="option4">Jane Doe</option>
						</select>
						
						<input class="button" type="submit" value="Send" />
						
					</fieldset>
					
				</form>
				
			</div> <!-- End #messages -->
			
		</div></div>
        <?php
		$mang = explode('/', $_SERVER['SCRIPT_NAME']);
		$n = count($mang);
		$str = $mang[$n-2].'_'.$mang[$n-1];
		$str = str_replace('.php', '', $str);
		?>
		<script language="javascript">
            document.getElementById('<?php echo $str?>').className = 'current';            
            var cha = document.getElementById('<?php echo $str?>').getAttribute('cha');        
            document.getElementById(cha).className = 'nav-top-item current';
        </script>
                
        